<?
$db_banner = new db_query('SELECT ban_id,ban_name,ban_format,ban_picture,ban_width,ban_height FROM banners WHERE ban_type = 1 AND ban_active = 1 AND lang_id = ' . $lang_id . ' ORDER BY ban_order ASC LIMIT 1');
$row = mysql_fetch_array($db_banner->result);
unset($db_banner);
?>
<div class="header_baner">
<?
if ($row['ban_format'] == 1) // banner Ảnh
{
?>
	<a href="/"><img src="/banners/<?=$row['ban_picture']?>" alt="<?=$row['ban_name']?>"></a>
<?
}
elseif ($row['ban_format'] == 2) // banner Flash
{
?>
	<script type="text/javascript">AC_FL_RunContent( 'codebase','http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,28,0','width','<?=$row['ban_width']?>','height','<?=$row['ban_height']?>','title','<?=$row['ban_name']?>','src','/banners/<?=substr($row['ban_picture'],0,strrpos($row['ban_picture'],'.'))?>','quality','high','pluginspage','http://www.adobe.com/shockwave/download/download.cgi?P1_Prod_Version=ShockwaveFlash','wmode','transparent' );</script>
<?
}
elseif ($row['ban_format'] == 3) // banner HTML
{
	// chua ho tro banner HTML
}
else
{
	// ko lam j ca
}
?>
</div>